<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>信息搜索 -觅TA网</title>
		<link rel="stylesheet" href="css/bootstrap.min.css" />
		<script type="text/javascript" src="js/jquery-3.3.0.js" ></script>
		<script type="text/javascript" src="js/bootstrap.min.js" ></script>
		<script type="text/javascript" src="js/popper.min.js" ></script>
		<link type="text/css" rel="stylesheet" href="css/xunwu.css"/>
		<style>
			#content tr a:hover{
				color: orange;
			}
            #list{
                table-layout:fixed;
            }
            .title{
                word-break:keep-all;/* 不换行 */
                white-space:nowrap;/* 不换行 */
                overflow:hidden;/* 内容超出宽度时隐藏超出部分的内容 */
                text-overflow:ellipsis;
            }
		</style>
	</head>
	<body>
		<div id="settled"></div>
		<div id="content" style="height: 1208px;">
			<table id="list" class="table table-striped" style="border-bottom: 1px solid #ddd;margin-bottom: 5px;">
				<tr>
                    <th style="width: 5%;">类型</th>
                    <th style="width: 25%;">信息标题</th>
                    <th style="width: 40%;">详情</th>
                    <th style="width: 20%;">酬谢方式</th>
                    <th style="width: 10%;">发布时间</th>
				</tr>
				<#list info.list as msg>
                    <#if msg.type==0>
                        <#assign msgType="寻物">
                    </#if>
                    <#if msg.type==1>
                        <#assign msgType="寻宠">
                    </#if>
                    <#if msg.type==2>
                        <#assign msgType="寻人">
                    </#if>
                    <#if msg.type==3>
                        <#assign msgType="招领">
                    </#if>
                <tr>
                    <td>${msgType!"寻物"}</td>
                    <td class="title"><a href="/detail?id=${msg.id}" target="_blank">${msg.title}</a></td>
                    <td class="title">${msg.detail}</td>
                    <td style="color: red;">
						<#assign way = "">
						<#if msg.thanks==1>
						<#assign way=way+"感谢信">
					</#if>
                        <#if way!=""&&msg.promise==1>
						<#assign way=way+"+">
					</#if>
                        <#if msg.promise==1>
						<#assign way=way+"酬金【"+msg.remuneration+"】">
					</#if>
                        <#if way=="">
						<#assign way="无">
					</#if>
                        ${way}
                    </td>
                    <td>${(msg.createTime?string("yyyy-MM-dd"))!.now?date}</td>
                </tr>
				</#list>
			</table>
            <div style="float: right;margin-right: 20px;">
                <nav aria-label="Page navigation">
                    <ul class="pagination">
					<#if info.isFirstPage>
                        <li class="disabled">
                          <span>
                            <span aria-hidden="true">&laquo;</span>
                          </span>
                        </li>
					<#else>
                        <li>
                            <a href="/search?pageNum=${info.prePage}&pageSize=30&key=${keyword}" aria-label="Previous">
                                <span aria-hidden="true">&laquo;</span>
                            </a>
                        </li>
					</#if>
					<#list 1..info.pages as i>
						<#if info.pageNum==i>
                            <li class="active"><a href="/search?pageNum=${i}&pageSize=30&key=${keyword}">${i}</a></li>
						<#else>
                            <li><a href="/search?pageNum=${i}&pageSize=30&key=${keyword}">${i}</a></li>
						</#if>

					</#list>

					<#if info.isLastPage>
                        <li class="disabled">
                          <span>
                            <span aria-hidden="true">&raquo;</span>
                          </span>
                        </li>
					<#else>
                        <li>
                            <a href="/search?pageNum=${info.nextPage}&pageSize=30&key=${keyword}" aria-label="Next">
                                <span aria-hidden="true">&raquo;</span>
                            </a>
                        </li>
					</#if>
                    </ul>
                </nav>
            </div>
		</div>
		<script>
			$("#settled").load("/loadConstant");
		</script>
	</body>
</html>
